package com.zenaprod.twodcore.graphic.map;


import com.zenaprod.twodcore.graphic.element.Element;

import java.util.ArrayList;
import java.util.List;

public class Map {
    private int width, height;
    private int rows, columns;

    private List<Element> elements;
    private List<List<Cell>> cells;


    public Map(int rows, int columns) {
        this.rows = rows;
        this.columns = columns;
    }


    public void addRow() {
        rows++;
        List<Cell> newRow = new ArrayList<Cell>();
        for(int i = 0 ; i < columns ; i++) {
            newRow.add(new Cell(rows, i));
        }
        cells.add(newRow);
    }

    public void addColumn() {
        columns++;
        for(int i = 0 ; i < cells.size() ; i++) {
            cells.get(i).add(new Cell(i, columns));
        }
    }




}
